package com.crm.jdy.common.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.crm.jdy.common.pojo.ClientContractInfo;
import com.crm.jdy.common.vo.PageVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ClientContractInfoDto extends PageVO  implements Serializable {

    private static final long serialVersionUID = 160756140L;

    @TableId(value = "contract_id", type = IdType.ID_WORKER_STR)
    @ApiModelProperty(name = "contractId" , value = "合同主键id")
    private String contractId;

    @NotBlank(message = "合同名称非空")
    @ApiModelProperty(name = "contractName" , value = "合同名称")
    private String contractName;

    @NotBlank(message = "客户名称非空")
    @ApiModelProperty(name = "contractClient" , value = "客户名称")
    private String contractClient;

    @NotBlank(message = "商机名称非空")
    @ApiModelProperty(name = "contractSource" , value = "商机名称")
    private String contractSource;

    @ApiModelProperty(name = "contractMoney" , value = "合同金额")
    private String contractMoney;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "contractTime" , value = "签合同时间")
    private Date contractTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "contractStartTime" , value = "合同开始时间")
    private Date contractStartTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "contractEndTime" , value = "合同结束时间")
    private Date contractEndTime;

    @ApiModelProperty(name = "contractClientSigner" , value = "客户签约人")
    private String contractClientSigner;

    @ApiModelProperty(name = "contractCompanySigner" , value = "公司签约人")
    private String contractCompanySigner;

    @ApiModelProperty(name = "contractType" , value = "合同类型")
    private String contractType;

    @ApiModelProperty(name = "contractStatus" , value = "合同状态")
    private String contractStatus;

    @ApiModelProperty(name = "contractGetMoney" , value = "已收款金额")
    private String contractGetMoney;

    @ApiModelProperty(name = "contractNotgetMoney" , value = "未收款金额")
    private String contractNotgetMoney;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "contractLastTime" , value = "最后跟进时间")
    private Date contractLastTime;

    @ApiModelProperty(name = "contractChargePerson" , value = "负责人")
    private String contractChargePerson;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "createTime" , value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "updateTime" , value = "更新最新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(name = "contractCreatePerson" , value = "创建人")
    private String contractCreatePerson;

    @JsonIgnore
    @TableLogic
    @ApiModelProperty(name = "isDelete" , value = "0正常，1删除")
    private Integer isDelete;


    }
